<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:padding="16dp">

    <Spinner
        android:id="@+id/fromCurrency"
        android:layout_width="match_parent"
        android:layout_height="36dp"

        android:layout_marginLeft="20dp"
        android:layout_marginTop="16dp"
        android:layout_marginRight="20dp"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

    <Spinner
        android:id="@+id/toCurrency"
        android:layout_width="match_parent"
        android:layout_height="36dp"
        android:layout_marginLeft="20dp"
        android:layout_marginTop="60dp"
        android:layout_marginRight="20dp"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

    <EditText
        android:id="@+id/fromCurrencyNumber"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginStart="20dp"
        android:layout_marginTop="16dp"
        android:layout_marginEnd="20dp"
        android:ems="10"
        android:inputType="numberDecimal"
        app:layout_constraintTop_toBottomOf="@+id/toCurrency"
        tools:layout_editor_absoluteX="16dp"
        android:hint="@string/enter_value" />

    <TextView
        android:id="@+id/result_text"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginLeft="20dp"
        android:layout_marginTop="32dp"
        android:layout_marginRight="20dp"
        android:text=""
        android:textSize="28sp"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/fromCurrencyNumber" />

    <androidx.appcompat.widget.AppCompatButton
        android:id="@+id/calculate_button"
        android:layout_width="match_parent"
        android:layout_height="51dp"
        android:layout_marginStart="20dp"
        android:layout_marginTop="64dp"
        android:layout_marginEnd="20dp"
        android:background="@color/nord_200"
        android:onClick="solveCurrency"
        android:text="@string/calculate_button"
        android:textColor="@color/white"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/result_text" />

</androidx.constraintlayout.widget.ConstraintLayout>